#include <GL/glfw.h>
#include <iostream>
#ifndef FPS
#define FPS
class Fps
{
    public:
    void printFps()
    {

        float timeNow = glfwGetTime();
        float timeDifference = timeNow - timeLast;
        timeElapsed += timeDifference;
        framesElapsed++;
        if(timeElapsed > 1.0f)
        {
            std::cout << "Fps: " << float(framesElapsed) / (timeElapsed) << std::endl;
            timeElapsed = 0.0f;
            framesElapsed = 0;
        }
        timeLast = timeNow;
    }
    Fps(){timeLast = timeElapsed = 0.0f; framesElapsed = 0;}
    protected:
    private:
    float timeLast;
    float timeElapsed;
    int framesElapsed;
};
#endif
